<%--
  Created by IntelliJ IDEA.
  User: 雷神
  Date: 2021/4/7
  Time: 11:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="view/bootstrap-3.3.5/css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="view/bootstrapvalidator/css/bootstrapValidator.css" />
    <script charset="utf-8" src="view/jquery/jquery-1.10.2.min.js"></script>
    <script charset="utf-8" src="view/bootstrap-3.3.5/js/bootstrap.js"></script>
    <script charset="utf-8" src="view/bootstrapvalidator/js/bootstrapValidator.js"></script>
</head>
<body>
<div class="panel-heading">
    <h2>固定资产修改列表</h2>
</div>

<form action="zcset/update?oid=${zcaset.oid}" role="form" class="form-horizontal"
      id="myform" method="post">
    <div class="row">

        <div class="form-group">
            <label class="col-md-2 control-label">资产类型</label>
            <div class="col-md-3">
                <select name="type" class="form-control">
                    <option value="">请选择</option>
                    <c:forEach items="${zctype}" var="t">
                        <option value="${t.oid}"
                                <c:if test="${zcaset.type==t.oid}">selected</c:if>>${t.typeName}</option>
                    </c:forEach>
                </select>
                <input type="hidden" value="${zcaset.assetCode}" name="assetCode">

            </div>
        </div>

        <div class="form-group">
            <label class="col-md-2 control-label">资产序列号</label>
            <div class="col-md-3">
                <input type="text" class="form-control" name="assetNumber"
                       placeholder="资产序列号" value="${zcaset.assetNumber}">

            </div>
        </div>

    </div>

    <div class="row">
        <div class="form-group">
            <label class="col-md-2 control-label">规格型号</label>
            <div class="col-md-3">
                <input type="text" class="form-control" name="guige"
                       placeholder="规格型号" value="${zcaset.guige}">
            </div>
        </div>

        <div class=" form-group">
            <label class="col-md-2 control-label">资产名称</label>
            <div class="col-md-3">
                <input type="text" class="form-control" name="assetNanme"
                       placeholder="资产名称" value="${zcaset.assetNanme}">
            </div>
        </div>
    </div>
    <div class="row">
        <div class="form-group">
            <label class="col-md-2 control-label">出厂时间</label>
            <div class="col-md-3">
                <input type="date" class="form-control" name="produceTime"
                       placeholder="出厂时间" value="<fmt:formatDate pattern="yyyy-MM-dd" value="${zcaset.produceTime}" />">

            </div>
        </div>
        <div class="form-group">
            <label class="col-md-2 control-label">存放地点</label>
            <div class="col-md-3">
                <select name="depositary" class="form-control">
                    <option value="">请选择存放地点</option>
                    <c:forEach items="${jcbasedd}" var="jcd">
                        <option value="${jcd.oid}"<c:if
                                test="${zcaset.depositary==jcd.oid}"> selected</c:if>>${jcd.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>

    </div>

    <div class="row">
        <div class="form-group">
            <label class="col-md-2 control-label">库管</label>
            <div class="col-md-3">
                <select name="keeper" class="form-control">
                    <option value="">请选择库管</option>
                    <c:forEach items="${emp}" var="e">
                        <option value="${e.oid}" <c:if
                                test="${zcaset.keeper==e.oid}"> selected</c:if>>${e.empName}</option>
                    </c:forEach>
                </select>
                <input type="hidden" name="createDate" value="${zcaset.createDate}">
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-2 control-label">单价</label>
            <div class="col-md-3">
                <input type="text" class="form-control" name="price"
                       placeholder="请输入单价" value="${zcaset.price}">
            </div>
        </div>
    </div>
    <div class="row">
        <div class="form-group">
            <label class="col-md-2 control-label">入库时间</label>
            <div class="col-md-3">
                <input type="date" class="form-control" name="regDate"
                       placeholder="入库时间" value="<fmt:formatDate pattern="yyyy-MM-dd" value="${zcaset.regDate}" />">

            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">资产来源</label>
            <div class="col-md-3">
                <select name="addType" class="form-control">
                    <option value="">请选择资产来源</option>
                    <c:forEach items="${jcbase}" var="jc">
                        <option value="${jc.oid}" <c:if
                                test="${zcaset.addType==jc.oid}"> selected</c:if>>${jc.name}</option>
                    </c:forEach>
                </select>

            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">备注</label>
        <div class="col-md-3">
            <input type="text" class="form-control" name="remark"
                   placeholder="请输入备注" value="${zcaset.remark}">
        </div>
    </div>
    <div class="row">
        <div class="form-group">
            <label class="col-sm-2 control-label">经办人</label>
            <div class="col-md-3">
                <select name="jinban" class="form-control">
                    <option value="">请选择经办人</option>
                    <c:forEach items="${emp}" var="e">
                        <option value="${e.oid}" <c:if
                                test="${zcaset.jinban==e.oid}"> selected</c:if> >${e.empName}</option>
                    </c:forEach>
                </select>

            </div>
        </div>

    </div>
    <div class="row">
        <div class="form-group">
            <label class="col-sm-2 control-label">数量</label>
            <div class="col-md-3">
                <input type="text" class="form-control" name="amount"
                       placeholder="请输入数量" value="${zcaset.amount}">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">创建人</label>
            <div class="col-md-3">
                <select name="creator" class="form-control" s>
                    <option value="">请选择创建人</option>
                    <c:forEach items="${emp}" var="e">
                        <option value="${e.oid}" <c:if
                                test="${zcaset.creator==e.oid}"> selected</c:if>>${e.empName}</option>
                    </c:forEach>
                </select>
            </div>
        </div>

    </div>

    <div class="row">
        <div class="form-group">
            <label class="col-sm-2 control-label">状态</label>
            <div class="col-md-4">
                <input type="radio" name="status" ${zcaset.status=="1"?"checked":""} value="1">使用中
                <input type="radio" name="status" ${zcaset.status=="2"?"checked":""} value="2">闲置的
                <input type="radio" name="status" ${zcaset.status=="3"?"checked":""} value="3">报废的
            </div>
        </div>
    </div>

    <div class="modal-footer">
        <button type="submit" class="btn btn-primary">修改</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
    </div>

</form>
</body>
</html>
